package com.happy.service.impl;

import com.happy.dao.TestDetailDao;
import com.happy.pojo.RequestMessage;
import com.happy.pojo.TestDetail;
import com.happy.pojo.User;
import com.happy.service.TestDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * @Author: happyin
 * @Date: 2021/9/27 17:27
 * @Version: 1.0
 */

@Transactional
@Service
public class TestDetailServiceImpl implements TestDetailService {
    @Autowired
    private TestDetailDao testDetailDao;

    @Override
    public int save(TestDetail testDetail) {
        int result = 0;
        try {
            result = testDetailDao.insert(testDetail);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return result;
    }

    @Override
    public int deleteByRequestMessageId(Integer id) {
        int result = 0;
        try {
            result = testDetailDao.deleteByRequestMessageId(id);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return result;
    }
}
